<div class="art-post">
	<div class="art-post-tl"></div>
	<div class="art-post-tr"></div>
	<div class="art-post-bl"></div>
	<div class="art-post-br"></div>
	<div class="art-post-tc"></div>
	<div class="art-post-bc"></div>
	<div class="art-post-cl"></div>
	<div class="art-post-cr"></div>
	<div class="art-post-cc"></div>
	<div class="art-post-body">
	<div class="art-post-inner art-article">
        <h2 class="art-postheader">[Danh sách danh mục]</h2>
		<input type="button" value="Thêm danh mục mới" onclick="window.location='<?php echo Utility::getSiteUrl();?>/category/add'" style="height:30px">
		<br /><br/>
		<table class="item-list">
			<thead>
			<tr>
				<th><a id="toggle-all"></a></th>
				<th><a href="">STT</a></th>
				<th><a href="">Tên danh mục</a></th>
				<th><a href="">Options</a></th>
			</tr>
			</thead>
			<tbody>
				<?php
					if(isset($cat_list))
					{
						$size = count($cat_list);
						if($size == 0)
						{
							?>
					<tr>
						<td colspan="4" style="color:red;font-weight:bold;">Chưa có danh mục nào</td>
					</tr>
							<?php
						}
						else
						{
							$i = 1;
							foreach($cat_list as $cat)
							{
								?>
					<tr>
						<td><input type="checkbox"/></td>
						<td><?php echo $i; ?></td>
						<td style="text-align:left;padding-left:5px">
							<?php for($j = 0;$j < $cat->c_level;$j++) echo " - - ";?>
							<a href="<?php echo Utility::getSiteUrl() . "/category/edit/" . $cat->id;?>"><strong><?php echo $cat->name ?></strong></a></td>
						<td>
							<div class="tbl-option-block">
								<a href="<?php echo Utility::getSiteUrl() . "/category/edit/" . $cat->id;?>" title="Sửa" class="icon-edit"></a>
								<a href="<?php echo Utility::getSiteUrl() . "/category/remove/"
								. $cat->id;?>" title="Xóa" class="icon-remove"></a>
							</div>
						</td>
					</tr>
								<?php
								$i++;
							}
						}
					}
				 ?>
			</tbody>
		</table>
</div>
  
		<div class="cleared"></div>
	  </div>
  </div>